package com.test.entity.maindatachange;

import com.alibaba.fastjson.JSON;

import java.util.Arrays;

/**
 * Created by IntelliJ IDEA.
 * User: bj910
 * Date:2023-11-01
 * Time: 20:21
 * To change this template use File | Settings | File Templates.
 */
public class Entity2Json {
    public static void main(String[] args) {
        BizChangeApplyDTO dto = new BizChangeApplyDTO();

        dto.setChangeType("10");
        dto.setBizType("1");
        dto.setApplyAccount("dcdou2");
        dto.setApplyName("窦得成");
        dto.setChangeReason("业务需要");
        dto.setChangeFile("http://www.baidu.com");
        dto.setChangeTime("2023-11-11 11:11:11");
        TeamInfoDTO teamInfo1 = TeamInfoDTO.builder().teamType("1").bizType("1").accountCode("dcdou2").accountName("窦得成")
                .roleId("1").roleCode("1").roleName("1").position("1").positionRank("1").sequenceNo("1")
                .departmentCode("1").departmentName("1").build();
        TeamInfoDTO teamInfo2 = TeamInfoDTO.builder().teamType("2").bizType("1").accountCode("dcdou2").accountName("窦得成")
                .roleId("1").roleCode("1").roleName("1").position("1").positionRank("1").sequenceNo("1")
                .departmentCode("1").departmentName("1").build();
        TeamInfoDTO teamInfo3 = TeamInfoDTO.builder().teamType("3").bizType("1").accountCode("dcdou2").accountName("窦得成")
                .roleId("1").roleCode("1").roleName("1").position("1").positionRank("1").sequenceNo("1")
                .departmentCode("1").departmentName("1").build();

        TeamInfoDTO teamInfo4 = TeamInfoDTO.builder().teamType("1").bizType("1").accountCode("dcdou2").accountName("窦得成")
                .roleId("1").roleCode("1").roleName("1").position("1").positionRank("1").sequenceNo("1")
                .departmentCode("1").departmentName("1").build();
        TeamInfoDTO teamInfo5 = TeamInfoDTO.builder().teamType("2").bizType("1").accountCode("dcdou2").accountName("窦得成")
                .roleId("1").roleCode("1").roleName("1").position("1").positionRank("1").sequenceNo("1")
                .departmentCode("1").departmentName("1").build();
        BusinessFinancialDTO businessFinancial1 = BusinessFinancialDTO.builder().bizType("1").yearFlag("1").salesRevenue("1").grossProfitRate("1")
                .grossProfitAmount("1").virtualProfit("1").build();
        BusinessMarketShareDTO businessMarketShare1 = BusinessMarketShareDTO.builder().bizType("1").marketSpace("1")
                .marketCapacity("1").increaseRate("1").firstYear("111").firstMarketShare("11").firstMarketRate("11")
                .secondYear("1").secondMarketRate("1").secondMarketShare("1")
                .thirdYear("1").thirdMarketRate("1").thirdMarketShare("1").build();

        ThreeOrdersValidateDTO threeOrdersValidate1 = ThreeOrdersValidateDTO.builder().bizType("1").orderNum("1")
                .chargePersonName("鲍军").chargePersonAccount("junbao3").selectCustomerName("11")
                .keyValidationIndex("1").validationIndexDefinition("1")
                .planCompletionAcceptanceTime("2023-01-01").acceptancePersonAccount("junbao3")
                .acceptancePersonName("鲍军").build();
        OriginalDataDTO originalData = OriginalDataDTO.builder().bizCode("111").bizName("111").productGroupCode("111")
                .productGroupName("111").versionCode("111").versionNumber("111").plannedLaunchTime("2023-11-11")
                .bizType("RJ").customerType(Arrays.asList("ToG")).customerGroup("111").versionLifeCycleStartTime("2023-11-11")
                .versionLifeCycleEndTime("2023-11-11").profitCenterName("111").profitCenterCode("111").productDirectorName("111")
                .productDirectorAccount("111").compatibleVersion("111").bizUpgradeDescription("111").bizDescription("111")
                .productLineName("111").productLineCode("111").orgCode("11").orgName("11").businessDept("11")
                .companyName("1").companyCode("1").versionStatus("10")
                .teamInfos(Arrays.asList(teamInfo1,teamInfo2,teamInfo3))
                .businessFinancials(Arrays.asList(businessFinancial1))
                .businessMarketShares(Arrays.asList(businessMarketShare1))
                .threeOrdersValidates(Arrays.asList(threeOrdersValidate1)).build();
        BusinessFinancialDTO businessFinancial = BusinessFinancialDTO.builder().bizType("1").yearFlag("1").salesRevenue("1").grossProfitRate("1")
                .grossProfitAmount("1").virtualProfit("1").build();
        BusinessMarketShareDTO businessMarketShare = BusinessMarketShareDTO.builder().bizType("1").marketSpace("1")
                .marketCapacity("1").increaseRate("1").firstYear("111").firstMarketShare("11").firstMarketRate("11")
                .secondYear("1").secondMarketRate("1").secondMarketShare("1")
                .thirdYear("1").thirdMarketRate("1").thirdMarketShare("1").build();

        ThreeOrdersValidateDTO threeOrdersValidate = ThreeOrdersValidateDTO.builder().bizType("1").orderNum("1")
                .chargePersonName("鲍军").chargePersonAccount("junbao3").selectCustomerName("11")
                .keyValidationIndex("1").validationIndexDefinition("1")
                .planCompletionAcceptanceTime("2023-01-01").acceptancePersonAccount("junbao3")
                .acceptancePersonName("鲍军").build();
        OriginalDataDTO updateData = OriginalDataDTO.builder().bizCode("111").bizName("222").productGroupCode("111")
                .productGroupName("111").versionCode("111").versionNumber("111").plannedLaunchTime("2023-11-11")
                .bizType("RJ").customerType(Arrays.asList("ToG")).customerGroup("111").versionLifeCycleStartTime("2023-11-11")
                .versionLifeCycleEndTime("2023-11-11").profitCenterName("111").profitCenterCode("111").productDirectorName("111")
                .productDirectorAccount("111").compatibleVersion("111").bizUpgradeDescription("111").bizDescription("111")
                .productLineName("111").productLineCode("111").orgCode("11").orgName("11").businessDept("11")
                .companyName("1").companyCode("1").versionStatus("10")
                .teamInfos(Arrays.asList(teamInfo4,teamInfo5))
                .businessFinancials(Arrays.asList(businessFinancial))
                .businessMarketShares(Arrays.asList(businessMarketShare))
                .threeOrdersValidates(Arrays.asList(threeOrdersValidate)).build();


        dto.setOriginalData(originalData);
        dto.setUpdateData(updateData);

        String jsonString = JSON.toJSONString(dto);
        System.out.println(jsonString);
    }
}
